<?php get_instance()->view('common/header');?>
<div class="page-container home">
    <?php get_instance()->view('common/sidebar');?>
    <div class="page-content-wrapper">
        <div class="page-content">
            <div class="row">
                <div class="col-md-12">
                    <!-- BEGIN PAGE TITLE & BREADCRUMB-->
                    <h3 class="page-title"> <?php echo $title ?> </h3>
                    <ul class="page-breadcrumb breadcrumb">
                        <li><i class="fa fa-home"></i><a href="javascript:void(0);"><?php echo $title ?> </a></li>
                    </ul>
                    <!-- END PAGE TITLE & BREADCRUMB-->
                </div>
            </div>
            <div class="row">
                <div class="col-md-12">
                    <!--end row-->
                    <div class="tabbable tabbable-custom tabbable-custom-profile">
                        <ul class="nav nav-tabs">
                            <li class="active"><a href="#tab_1_1" data-toggle="tab">买家秀</a></li>
                            <li><a href="#tab_1_2" data-toggle="tab"> 卖家秀 </a></li>
                        </ul>
                        <div class="tab-content">
                            <!--买家秀-->
                            <div class="active tab-pane " id="tab_1_1">
                                <div class="table-responsive">
                                    <div class="table-container">
                                        <div class="table-actions-wrapper"> <span> </span></div>
                                        <table class="table table-bordered table-hover" id="datatable_buyes">
                                            <thead>
                                            <tr role="row" class="heading">
                                                <th width="8%" sort="false">所属用户</th>
                                                <th width="12%" > 内容 </th>
                                                <th width="10%" sort="false">GPS</th>
                                                <th width="14%" sort="false">地址</th>
                                                <th width="6%" sort="false">浏览次数</th>
                                                <th width="8%" sort="false">状态</th>
                                                <th width="10%" sort="false">添加时间</th>
                                                <th width="10%" sort="false">操作</th>
                                            </tr>
                                            <tr>
                                                <th><input class="form-control form-filter input-sm" name="consumer" type="text"></th>
                                                <th><input class="form-control form-filter input-sm" name="c_content" type="text"></th>
                                                <th></th>
                                                <th><input class="form-control form-filter input-sm" name="c_address" type="text"></th>
                                                <th></th>
                                                <th>
                                                    <select name="c_status" class="form-control form-filter input-sm">
                                                        <option value="0" selected>所有</option>
                                                        <option value="2">显示</option>
                                                        <option value="1">隐藏</option>
                                                    </select>
                                                </th>
                                                <th>
                                                    <div class="margin-bottom-5">
                                                        <input class="form-control form-filter input-sm" name="c_send_date_from" dp placeholder="从" type="text">
                                                    </div>
                                                    <input class="form-control form-filter input-sm" name="c_send_date_to" dp placeholder="到" type="text" >
                                                </th>
                                                <th> <div class="btn-group">
                                                        <a class="btn btn-xs filter-submit btn-default"><i class="fa fa-search"></i> 搜索</a>
                                                        <button data-toggle="dropdown" class="btn btn-default dropdown-toggle btn-xs" type="button"><i class="fa fa-angle-down"></i></button>
                                                        <ul role="menu" class="dropdown-menu pull-right">
                                                            <li><a href="javascript:void(0);" class="filter-cancel">重置</a></li>
                                                        </ul>
                                                    </div>
                                                </th>
                                            </tr>
                                            </thead>
                                            <tbody></tbody>
                                        </table>
                                    </div>
                                </div>
                            </div>

                            <!--卖家秀-->
                            <div class="tab-pane" id="tab_1_2">
                                <div class="table-responsive">
                                    <div class="table-container">
                                        <div class="table-actions-wrapper"> <span> </span></div>
                                        <table class="table table-bordered table-hover" id="datatable_seller">
                                            <thead>
                                            <tr role="row" class="heading">
                                                <th width="8%" sort="false">所属商家</th>
                                                <th width="12%" > 内容 </th>
                                                <th width="10%" sort="false">GPS</th>
                                                <th width="14%" sort="false">地址</th>
                                                <th width="6%" sort="false">浏览次数</th>
                                                <th width="8%" sort="false">状态</th>
                                                <th width="10%" sort="false">添加时间</th>
                                                <th width="10%" sort="false">操作</th>
                                            </tr>
                                            <tr>
                                                <th><input class="form-control form-filter input-sm" name="merchant" type="text"></th>
                                                <th><input class="form-control form-filter input-sm" name="m_content" type="text"></th>
                                                <th></th>
                                                <th><input class="form-control form-filter input-sm" name="m_address" type="text"></th>
                                                <th></th>
                                                <th>
                                                    <select name="m_status" class="form-control form-filter input-sm">
                                                        <option value="0" selected>所有</option>
                                                        <option value="2">显示</option>
                                                        <option value="1">隐藏</option>
                                                    </select>
                                                </th>
                                                <th>
                                                    <div class="margin-bottom-5">
                                                        <input class="form-control form-filter input-sm" name="m_send_date_from" dp placeholder="从" type="text">
                                                    </div>
                                                    <input class="form-control form-filter input-sm" name="m_send_date_to" dp placeholder="到" type="text" >
                                                </th>
                                                <th> <div class="btn-group">
                                                        <a class="btn btn-xs filter-submit btn-default"><i class="fa fa-search"></i> 搜索</a>
                                                        <button data-toggle="dropdown" class="btn btn-default dropdown-toggle btn-xs" type="button"><i class="fa fa-angle-down"></i></button>
                                                        <ul role="menu" class="dropdown-menu pull-right">
                                                            <li><a href="javascript:void(0);" class="filter-cancel">重置</a></li>
                                                        </ul>
                                                    </div>
                                                </th>
                                            </tr>
                                            </thead>
                                            <tbody></tbody>
                                        </table>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<script type="text/javascript">
    $(function(){
        datatable_init({
            src: $("#datatable_buyes"),
            sAjaxSource: "<?php echo getUrl('friends/getList');?>",
            aoColumnDefs : [{
                'bSortable' : false,
                'aTargets' : [0,1,2,3,5,7]
            }]
        });

        datatable_init({
            src: $("#datatable_seller"),
            sAjaxSource: "<?php echo getUrl('friends/getMerchantList');?>",
            aoColumnDefs : [{
                'bSortable' : false,
                'aTargets' : [0,1,2,3,5,7]
            }]
        });

        $('[dp]').not("[noinit]").datepicker({
            changeMonth: true,
            autoclose: true,
            format: "yyyy-mm-dd",
            language: 'zh-CN'
        });
    });

    //异步调用
    function ajaxRequestCallBack(e){
        $('#datatable_buyes').dataTable().fnDraw(true);  // 商品分类
        $('#datatable_seller').dataTable().fnDraw(true);  // 商品分类
    }
</script>
</body>
</html>